#ifndef UICOMPBOBOX_H
#define UICOMPBOBOX_H

#include "UIContainer.h"

class UIComboBox : public UIContainer{

public:
    UIComboBox(UIContainer *parent);
    ~UIComboBox();

public:
    DEFINE_PROPERTY(std::vector<std::wstring>, Items, {});
    DEFINE_PROPERTY(int, SelectedIndex, -1);
    DEFINE_PROPERTY(int, ExtendHeight, 100);
    DEFINE_PROPERTY(bool, IsDropDown, false);

    void setTextW(const std::wstring text);  // 不支持设置文本
    std::wstring getTextW(); 
    void onDrawContent(DuiWinManager *mgr, DuiRect &rect_in, DuiRect &rect_out);
    std::string getUIType() override;

    bool isInContainer(int x, int y);
    void onMouseDown(int x, int y);
    void onMouseLeave();
};

#endif